🌎 rns.kin.earth git 🌍
Commit 3e7ab5136ee06fe664426db1738e5cd69c8d55d9
Parents : d2cf3c2
Author : Mark Qvist <mark@unsigned.io>
Date : 2025-01-19T00:57:36+01:00
Better thread configuration
Changes
2 files changed, 2 insertions(+), 1 deletions(-)
Diff
diff --git a/RNS/Interfaces/LocalInterface.py b/RNS/Interfaces/LocalInterface.py
index 86b6b1a5..0e39b546 100644
--- a/RNS/Interfaces/LocalInterface.py
+++ b/RNS/Interfaces/LocalInterface.py
@@ -319,6 +319,7 @@ class LocalServerInterface(Interface):
address = (self.bind_ip, self.bind_port)
self.server = ThreadingTCPServer(address, handlerFactory(self.incoming_connection))
+ self.server.daemon_threads = True
thread = threading.Thread(target=self.server.serve_forever)
thread.daemon = True
diff --git a/RNS/Transport.py b/RNS/Transport.py
index 5fb88c9d..231dcee4 100755
--- a/RNS/Transport.py
+++ b/RNS/Transport.py
@@ -2690,7 +2690,7 @@ class Transport:
def detach_job():
RNS.log(f"Detaching {interface}", RNS.LOG_EXTREME)
interface.detach()
- dt = threading.Thread(target=detach_job, daemon=True)
+ dt = threading.Thread(target=detach_job, daemon=False)
dt.start()
detach_threads.append(dt)
Served by rngit 1.5.2 - Generated in 0.06s